package cn.com.guage.dtm.huawei;

import java.util.Scanner;
import java.util.Stack;

public class HJ12_字符串反转 {
    public static void main(String[] args) {
       // method1();
        method2();
    }

    private static void method1(){
        Scanner sc = new Scanner(System.in);
        String  line = sc.nextLine();
        char[] charArray = line.toCharArray();
        int length = charArray.length;
        StringBuffer sb = new StringBuffer();
        for(int i = length -1 ; i >=0 ;i--){
            char charStr = charArray[i];
            sb.append(charStr + "");
        }
        System.out.println(sb.toString());
    }
    private static void method2(){
        Stack stack = new Stack();
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        for (int i = 0; i <s.trim().length() ; i++) {
            stack.push(s.charAt(i));
        }
        while(!stack.empty()){
            System.out.print(stack.pop());
        }
    }

}
